package org.jeecg.common.exception;

import java.io.Serializable;

/**
 * 说明：框架基本异常类
 * @Title: BaseException.java
 * @Package: xxx
 * @See: {@link Exception}
 * Copyright: xxx
 * Company: xxx
 * @author: fuyp
 * @date: 2021-7-21 16:44:34
 * @version: V1.0
 *
 */
public class BaseException extends Exception {
    private static final long serialVersionUID = 6257960122414939659L;
    /**
     * 说明： 构造函数
     * @Title:BaseException.java
     * @See: 构造函数
     * @date 2021-7-21 16:48:40
     */
    public BaseException() {
        super("Base Exception");
    }

    /**
     * 说明： 构造函数
     *
     * @Title:BaseException.java
     * @See: 构造函数
     * @param message 错误信息
     * @date 2021-7-21 16:48:11
     */
    public BaseException(final String message) {
        super(message);
        this.message = message;
    }

    /**
     * 说明：构造函数
     *
     * @Title:BaseException.java
     * @See: 构造函数
     * @param message 错误信息
     * @param params 信息参数
     * @date 2021-7-21 16:48:11
     */
    public BaseException(final String message, final Serializable ... params) {
        super(message);
        this.message = message;
        this.params = params;
    }

    // 消息内容
    private String message;
    // 参数
    private Serializable [] params;

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object[] getParams() {
        return params;
    }

    public void setParams(String... params) {
        this.params = params;
    }
}
